//////////////////////////////////////////////////////////////////////////
public:
	/// <summary>
	/// </summary>
	/// <param name="srcarr"></param>
	/// <param name="dstarr"></param>
	/// <param name="canny_threshold"></param>
	/// <param name="ffill_threshold"></param>
	/// <returns></returns>
	static IntPtr SegmentImage(IntPtr srcarr, IntPtr dstarr, double canny_threshold, double ffill_threshold, IntPtr storage)
	{
		return IntPtr(cvSegmentImage((CvArr*)srcarr.ToPointer(), (CvArr*)dstarr.ToPointer(), canny_threshold, ffill_threshold, (CvMemStorage*)storage.ToPointer()));
	}

	/// <summary>
	/// Calculates covariation matrix of a set of arrays
	/// </summary>
	/// <param name="nObjects"></param>
	/// <param name="input"></param>
	/// <param name="ioFlags"></param>
	/// <param name="ioBufSize"></param>
	/// <param name="buffer"></param>
	/// <param name="userData"></param>
	/// <param name="avg"></param>
	static void CalcCovarMatrixEx(int nObjects, IntPtr input, EigenObjectIOFlag ioFlags, int ioBufSize, IntPtr buffer, IntPtr userData, IntPtr avg, IntPtr covarMatrix)
	{
		cvCalcCovarMatrixEx(nObjects, (void*)input.ToPointer(), (int)ioFlags, ioBufSize, (uchar*)buffer.ToPointer(), (void*)userData.ToPointer(), (IplImage*)avg.ToPointer(), (float*)covarMatrix.ToPointer());
	}

	/// <summary>
	/// Calculates eigen values and vectors of covariation matrix of a set of
	/// arrays
	/// </summary>
	/// <param name="nObjects"></param>
	/// <param name="input"></param>
	/// <param name="output"></param>
	/// <param name="ioFlags"></param>
	/// <param name="ioBufSize"></param>
	/// <param name="userData"></param>
	/// <param name="calcLimit"></param>
	/// <param name="avg"></param>
	static void CalcEigenObjects(int nObjects, IntPtr input, IntPtr output, EigenObjectIOFlag ioFlags, int ioBufSize, IntPtr userData, IntPtr calcLimit, IntPtr avg, IntPtr eigVals)
	{
		cvCalcEigenObjects(nObjects, (void*)input.ToPointer(), (void*)output.ToPointer(), (int)ioFlags, ioBufSize, (void*)userData.ToPointer(), (CvTermCriteria*)calcLimit.ToPointer(), (IplImage*)avg.ToPointer(), (float*)eigVals.ToPointer());
	}

	/// <summary>
	/// Calculates dot product (obj - avg) * eigObj (i.e. projects image to eigen vector)
	/// </summary>
	/// <param name="obj"></param>
	/// <param name="eigObj"></param>
	/// <returns></returns>
	static double CalcDecompCoeff(IntPtr obj, IntPtr eigObj, IntPtr avg)
	{
		return cvCalcDecompCoeff((IplImage*)obj.ToPointer(), (IplImage*)eigObj.ToPointer(), (IplImage*)avg.ToPointer());
	}

	/// <summary>
	/// Projects image to eigen space (finds all decomposion coefficients
	/// </summary>
	/// <param name="obj"></param>
	/// <param name="nEigObjs"></param>
	/// <param name="eigInput"></param>
	/// <param name="ioFlags"></param>
	/// <param name="userData"></param>
	/// <param name="avg"></param>
	static void EigenDecomposite(IntPtr obj, int nEigObjs, IntPtr eigInput, EigenObjectIOFlag ioFlags, IntPtr userData, IntPtr avg, IntPtr coeffs)
	{
		cvEigenDecomposite((IplImage*)obj.ToPointer(), nEigObjs, (void*)eigInput.ToPointer(), (int)ioFlags, (void*)userData.ToPointer(), (IplImage*)avg.ToPointer(), (float*)coeffs.ToPointer());
	}

	/// <summary>
	/// Projects original objects used to calculate eigen space basis to that space
	/// </summary>
	/// <param name="eigInput"></param>
	/// <param name="nEigObjs"></param>
	/// <param name="ioFlags"></param>
	/// <param name="userData"></param>
	/// <param name="coeffs"></param>
	/// <param name="avg"></param>
	static void EigenProjection(IntPtr eigInput, int nEigObjs, EigenObjectIOFlag ioFlags, IntPtr userData, IntPtr coeffs, IntPtr avg, IntPtr proj)
	{
		cvEigenProjection((void*)eigInput.ToPointer(), nEigObjs, (int)ioFlags, (void*)userData.ToPointer(), (float*)coeffs.ToPointer(), (IplImage*)avg.ToPointer(), (IplImage*)proj.ToPointer());
	}

	/// <summary>
	/// Creates 2D HMM
	/// </summary>
	/// <param name="stateNumber"></param>
	/// <param name="numMix"></param>
	/// <returns></returns>
	static IntPtr Create2DHMM(IntPtr stateNumber, IntPtr numMix, int obsSize)
	{
		return IntPtr(cvCreate2DHMM((int*)stateNumber.ToPointer(), (int*)numMix.ToPointer(), obsSize));
	}

	/// <summary>
	/// Releases HMM
	/// </summary>
	static void Release2DHMM(IntPtr hmm)
	{
		cvRelease2DHMM((CvEHMM**)hmm.ToPointer());
	}

	/// <summary>
	/// Creates storage for observation vectors
	/// </summary>
	/// <param name="numObs"></param>
	/// <returns></returns>
	static IntPtr CreateObsInfo(NAMESPACE::Size2D32s numObs, int obsSize)
	{
		return IntPtr(cvCreateObsInfo(*(CvSize*)&numObs, obsSize));
	}

	/// <summary>
	/// Releases storage for observation vectors
	/// </summary>
	static void ReleaseObsInfo(IntPtr obs_info)
	{
		cvReleaseObsInfo((CvImgObsInfo**)obs_info.ToPointer());
	}

	/// <summary>
	/// The function takes an image on input and and returns the sequnce of observations
	/// to be used with an embedded HMM; Each observation is top-left block of DCT
	/// coefficient matrix
	/// </summary>
	/// <param name="arr"></param>
	/// <param name="obs"></param>
	/// <param name="dctSize"></param>
	/// <param name="obsSize"></param>
	static void ImgToObs_DCT(IntPtr arr, IntPtr obs, NAMESPACE::Size2D32s dctSize, NAMESPACE::Size2D32s obsSize, NAMESPACE::Size2D32s delta)
	{
		cvImgToObs_DCT((CvArr*)arr.ToPointer(), (float*)obs.ToPointer(), *(CvSize*)&dctSize, *(CvSize*)&obsSize, *(CvSize*)&delta);
	}

	/// <summary>
	/// Uniformly segments all observation vectors extracted from image
	/// </summary>
	/// <param name="obs_info"></param>
	static void UniformImgSegm(IntPtr obs_info, IntPtr ehmm)
	{
		cvUniformImgSegm((CvImgObsInfo*)obs_info.ToPointer(), (CvEHMM*)ehmm.ToPointer());
	}

	/// <summary>
	/// Does mixture segmentation of the states of embedded HMM
	/// </summary>
	/// <param name="obs_info_array"></param>
	/// <param name="num_img"></param>
	static void InitMixSegm(IntPtr obs_info_array, int num_img, IntPtr hmm)
	{
		cvInitMixSegm((CvImgObsInfo**)obs_info_array.ToPointer(), num_img, (CvEHMM*)hmm.ToPointer());
	}

	/// <summary>
	/// Function calculates means, variances, weights of every Gaussian mixture
	/// of every low-level state of embedded HMM
	/// </summary>
	/// <param name="obs_info_array"></param>
	/// <param name="num_img"></param>
	static void EstimateHMMStateParams(IntPtr obs_info_array, int num_img, IntPtr hmm)
	{
		cvEstimateHMMStateParams((CvImgObsInfo**)obs_info_array.ToPointer(), num_img, (CvEHMM*)hmm.ToPointer());
	}

	/// <summary>
	/// Function computes transition probability matrices of embedded HMM
	/// given observations segmentation
	/// </summary>
	/// <param name="obs_info_array"></param>
	/// <param name="num_img"></param>
	static void EstimateTransProb(IntPtr obs_info_array, int num_img, IntPtr hmm)
	{
		cvEstimateTransProb((CvImgObsInfo**)obs_info_array.ToPointer(), num_img, (CvEHMM*)hmm.ToPointer());
	}

	/// <summary>
	/// Function computes probabilities of appearing observations at any state
	/// (i.e. computes P(obs|state) for every pair(obs,state))
	/// </summary>
	/// <param name="obs_info"></param>
	static void EstimateObsProb(IntPtr obs_info, IntPtr hmm)
	{
		cvEstimateObsProb((CvImgObsInfo*)obs_info.ToPointer(), (CvEHMM*)hmm.ToPointer());
	}

	/// <summary>
	/// Runs Viterbi algorithm for embedded HMM
	/// </summary>
	/// <param name="obs_info"></param>
	/// <returns></returns>
	static float EViterbi(IntPtr obs_info, IntPtr hmm)
	{
		return cvEViterbi((CvImgObsInfo*)obs_info.ToPointer(), (CvEHMM*)hmm.ToPointer());
	}

	/// <summary>
	/// Function clusters observation vectors from several images
	/// given observations segmentation.
	/// Euclidean distance used for clustering vectors.
	/// Centers of clusters are given means of every mixture
	/// </summary>
	/// <param name="obs_info_array"></param>
	/// <param name="num_img"></param>
	static void MixSegmL2(IntPtr obs_info_array, int num_img, IntPtr hmm)
	{
		cvMixSegmL2((CvImgObsInfo**)obs_info_array.ToPointer(), num_img, (CvEHMM*)hmm.ToPointer());
	}

	/// <summary>
	/// Creates hand mask image given several points on the hand
	/// </summary>
	/// <param name="hand_points"></param>
	/// <param name="img_mask"></param>
	static void CreateHandMask(IntPtr hand_points, IntPtr img_mask, IntPtr roi)
	{
		cvCreateHandMask((CvSeq*)hand_points.ToPointer(), (IplImage*)img_mask.ToPointer(), (CvRect*)roi.ToPointer());
	}

	/// <summary>
	/// Finds hand region in range image data
	/// </summary>
	/// <param name="points"></param>
	/// <param name="count"></param>
	/// <param name="indexs"></param>
	/// <param name="line"></param>
	/// <param name="size"></param>
	/// <param name="flag"></param>
	/// <param name="center"></param>
	/// <param name="storage"></param>
	static void FindHandRegion (IntPtr points, int count, IntPtr indexs, IntPtr line, NAMESPACE::Size2D32f size, int flag, IntPtr center, IntPtr storage, IntPtr numbers)
	{
		cvFindHandRegion ((CvPoint3D32f*)points.ToPointer(), count, (CvSeq*)indexs.ToPointer(), (float*)line.ToPointer(), *(CvSize2D32f*)&size, flag, (CvPoint3D32f*)center.ToPointer(), (CvMemStorage*)storage.ToPointer(), (CvSeq**)numbers.ToPointer());
	}

	/// <summary>
	/// Finds hand region in range image data (advanced version)
	/// </summary>
	/// <param name="points"></param>
	/// <param name="count"></param>
	/// <param name="indexs"></param>
	/// <param name="line"></param>
	/// <param name="size"></param>
	/// <param name="jc"></param>
	/// <param name="center"></param>
	/// <param name="storage"></param>
	static void FindHandRegionA(IntPtr points, int count, IntPtr indexs, IntPtr line, NAMESPACE::Size2D32f size, int jc, IntPtr center, IntPtr storage, IntPtr numbers)
	{
		cvFindHandRegionA((CvPoint3D32f*)points.ToPointer(), count, (CvSeq*)indexs.ToPointer(), (float*)line.ToPointer(), *(CvSize2D32f*)&size, jc, (CvPoint3D32f*)center.ToPointer(), (CvMemStorage*)storage.ToPointer(), (CvSeq**)numbers.ToPointer());
	}

	/// <summary>
	/// Additional operations on Subdivisions
	/// </summary>
	/// <param name="subdiv"></param>
	/// <param name="src"></param>
	static void DrawMosaic(IntPtr subdiv, IntPtr src, IntPtr dst)
	{
		icvDrawMosaic((CvSubdiv2D*)subdiv.ToPointer(), (IplImage*)src.ToPointer(), (IplImage*)dst.ToPointer());
	}

	/// <summary>
	/// checks planar subdivision for correctness. It is not an absolute check,
	/// but it verifies some relations between quad-edges
	/// </summary>
	/// <returns></returns>
	static int Subdiv2DCheck(IntPtr subdiv)
	{
		return icvSubdiv2DCheck((CvSubdiv2D*)subdiv.ToPointer());
	}

	/// <summary>
	///   Name:    cvFindStereoCorrespondence
	///   Purpose: find stereo correspondence on stereo-pair
	///   Context:
	///   Parameters:
	///     leftImage - left image of stereo-pair (format 8uC1).
	///     rightImage - right image of stereo-pair (format 8uC1).
	///  mode - mode of correspondence retrieval (now CV_DISPARITY_BIRCHFIELD only)
	///     dispImage - destination disparity image
	///     maxDisparity - maximal disparity
	///     param1, param2, param3, param4, param5 - parameters of algorithm
	///   Returns:
	///   Notes:
	///     Images must be rectified.
	///     All images must have format 8uC1.
	/// //F
	/// </summary>
	/// <param name="leftImage"></param>
	/// <param name="rightImage"></param>
	/// <param name="mode"></param>
	/// <param name="dispImage"></param>
	/// <param name="maxDisparity"></param>
	/// <param name="param1"></param>
	/// <param name="param2"></param>
	/// <param name="param3"></param>
	/// <param name="param4"></param>
	static void FindStereoCorrespondence(IntPtr leftImage, IntPtr rightImage, CorrespondenceRetrievalMode mode, IntPtr dispImage, int maxDisparity, double param1, double param2, double param3, double param4, double param5)
	{
		cvFindStereoCorrespondence((CvArr*)leftImage.ToPointer(), (CvArr*)rightImage.ToPointer(), (int)mode, (CvArr*)dispImage.ToPointer(), maxDisparity, param1, param2, param3, param4, param5);
	}

	/// <summary>
	///   Name:    cvFindStereoCorrespondence
	///   Purpose: find stereo correspondence on stereo-pair
	///   Context:
	///   Parameters:
	///     leftImage - left image of stereo-pair (format 8uC1).
	///     rightImage - right image of stereo-pair (format 8uC1).
	///  mode - mode of correspondence retrieval (now CV_DISPARITY_BIRCHFIELD only)
	///     dispImage - destination disparity image
	///     maxDisparity - maximal disparity
	///     param1, param2, param3, param4, param5 - parameters of algorithm
	///   Returns:
	///   Notes:
	///     Images must be rectified.
	///     All images must have format 8uC1.
	/// //F
	/// </summary>
	/// <param name="leftImage"></param>
	/// <param name="rightImage"></param>
	/// <param name="mode"></param>
	/// <param name="dispImage"></param>
	/// <param name="maxDisparity"></param>
	/// <param name="param1"></param>
	/// <param name="param2"></param>
	/// <param name="param3"></param>
	static void FindStereoCorrespondence(IntPtr leftImage, IntPtr rightImage, CorrespondenceRetrievalMode mode, IntPtr dispImage, int maxDisparity, double param1, double param2, double param3, double param4)
	{
		cvFindStereoCorrespondence((CvArr*)leftImage.ToPointer(), (CvArr*)rightImage.ToPointer(), (int)mode, (CvArr*)dispImage.ToPointer(), maxDisparity, param1, param2, param3, param4);
	}

	/// <summary>
	/// F///////////////////////////////////////////////////////////////////////////
	/// //
	///   Name:    cvFindStereoCorrespondence
	///   Purpose: find stereo correspondence on stereo-pair
	///   Context:
	///   Parameters:
	///     leftImage - left image of stereo-pair (format 8uC1).
	///     rightImage - right image of stereo-pair (format 8uC1).
	///  mode - mode of correspondence retrieval (now CV_DISPARITY_BIRCHFIELD only)
	///     dispImage - destination disparity image
	///     maxDisparity - maximal disparity
	///     param1, param2, param3, param4, param5 - parameters of algorithm
	///   Returns:
	///   Notes:
	///     Images must be rectified.
	///     All images must have format 8uC1.
	/// //F
	/// </summary>
	/// <param name="leftImage"></param>
	/// <param name="rightImage"></param>
	/// <param name="mode"></param>
	/// <param name="dispImage"></param>
	/// <param name="maxDisparity"></param>
	/// <param name="param1"></param>
	/// <param name="param2"></param>
	static void FindStereoCorrespondence(IntPtr leftImage, IntPtr rightImage, CorrespondenceRetrievalMode mode, IntPtr dispImage, int maxDisparity, double param1, double param2, double param3)
	{
		cvFindStereoCorrespondence((CvArr*)leftImage.ToPointer(), (CvArr*)rightImage.ToPointer(), (int)mode, (CvArr*)dispImage.ToPointer(), maxDisparity, param1, param2, param3);
	}

	/// <summary>
	/// F///////////////////////////////////////////////////////////////////////////
	/// //
	///   Name:    cvFindStereoCorrespondence
	///   Purpose: find stereo correspondence on stereo-pair
	///   Context:
	///   Parameters:
	///     leftImage - left image of stereo-pair (format 8uC1).
	///     rightImage - right image of stereo-pair (format 8uC1).
	///  mode - mode of correspondence retrieval (now CV_DISPARITY_BIRCHFIELD only)
	///     dispImage - destination disparity image
	///     maxDisparity - maximal disparity
	///     param1, param2, param3, param4, param5 - parameters of algorithm
	///   Returns:
	///   Notes:
	///     Images must be rectified.
	///     All images must have format 8uC1.
	/// //F
	/// </summary>
	/// <param name="leftImage"></param>
	/// <param name="rightImage"></param>
	/// <param name="mode"></param>
	/// <param name="dispImage"></param>
	/// <param name="maxDisparity"></param>
	/// <param name="param1"></param>
	static void FindStereoCorrespondence(IntPtr leftImage, IntPtr rightImage, CorrespondenceRetrievalMode mode, IntPtr dispImage, int maxDisparity, double param1, double param2)
	{
		cvFindStereoCorrespondence((CvArr*)leftImage.ToPointer(), (CvArr*)rightImage.ToPointer(), (int)mode, (CvArr*)dispImage.ToPointer(), maxDisparity, param1, param2);
	}

	/// <summary>
	/// F///////////////////////////////////////////////////////////////////////////
	/// //
	///   Name:    cvFindStereoCorrespondence
	///   Purpose: find stereo correspondence on stereo-pair
	///   Context:
	///   Parameters:
	///     leftImage - left image of stereo-pair (format 8uC1).
	///     rightImage - right image of stereo-pair (format 8uC1).
	///  mode - mode of correspondence retrieval (now CV_DISPARITY_BIRCHFIELD only)
	///     dispImage - destination disparity image
	///     maxDisparity - maximal disparity
	///     param1, param2, param3, param4, param5 - parameters of algorithm
	///   Returns:
	///   Notes:
	///     Images must be rectified.
	///     All images must have format 8uC1.
	/// //F
	/// </summary>
	/// <param name="leftImage"></param>
	/// <param name="rightImage"></param>
	/// <param name="mode"></param>
	/// <param name="dispImage"></param>
	/// <param name="maxDisparity"></param>
	static void FindStereoCorrespondence(IntPtr leftImage, IntPtr rightImage, CorrespondenceRetrievalMode mode, IntPtr dispImage, int maxDisparity, double param1)
	{
		cvFindStereoCorrespondence((CvArr*)leftImage.ToPointer(), (CvArr*)rightImage.ToPointer(), (int)mode, (CvArr*)dispImage.ToPointer(), maxDisparity, param1);
	}

	/// <summary>
	/// F///////////////////////////////////////////////////////////////////////////
	/// //
	///   Name:    cvFindStereoCorrespondence
	///   Purpose: find stereo correspondence on stereo-pair
	///   Context:
	///   Parameters:
	///     leftImage - left image of stereo-pair (format 8uC1).
	///     rightImage - right image of stereo-pair (format 8uC1).
	///  mode - mode of correspondence retrieval (now CV_DISPARITY_BIRCHFIELD only)
	///     dispImage - destination disparity image
	///     maxDisparity - maximal disparity
	///     param1, param2, param3, param4, param5 - parameters of algorithm
	///   Returns:
	///   Notes:
	///     Images must be rectified.
	///     All images must have format 8uC1.
	/// //F
	/// </summary>
	/// <param name="leftImage"></param>
	/// <param name="rightImage"></param>
	/// <param name="mode"></param>
	/// <param name="dispImage"></param>
	static void FindStereoCorrespondence(IntPtr leftImage, IntPtr rightImage, CorrespondenceRetrievalMode mode, IntPtr dispImage, int maxDisparity)
	{
		cvFindStereoCorrespondence((CvArr*)leftImage.ToPointer(), (CvArr*)rightImage.ToPointer(), (int)mode, (CvArr*)dispImage.ToPointer(), maxDisparity);
	}

	/// <summary>
	/// </summary>
	/// <param name="coeffs[3][3]"></param>
	/// <param name="cameraPoint"></param>
	/// <param name="warpPoint"></param>
	/// <returns></returns>
	static int ConvertWarpCoordinates(double coeffs[3][3], IntPtr cameraPoint, IntPtr warpPoint, ConvertWarpDirection direction)
	{
		return icvConvertWarpCoordinates(coeffs, (CvPoint2D32f*)cameraPoint.ToPointer(), (CvPoint2D32f*)warpPoint.ToPointer(), (int)direction);
	}

	/// <summary>
	/// </summary>
	/// <param name="pointCorner"></param>
	/// <param name="point1"></param>
	/// <param name="point2"></param>
	/// <returns></returns>
	static int GetSymPoint3D(NAMESPACE::Point3D64f pointCorner, NAMESPACE::Point3D64f point1, NAMESPACE::Point3D64f point2, IntPtr pointSym2)
	{
		return icvGetSymPoint3D(*(CvPoint3D64f*)&pointCorner, *(CvPoint3D64f*)&point1, *(CvPoint3D64f*)&point2, (CvPoint3D64f*)pointSym2.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="point1"></param>
	/// <param name="point2"></param>
	static void GetPieceLength3D(NAMESPACE::Point3D64f point1, NAMESPACE::Point3D64f point2, IntPtr dist)
	{
		icvGetPieceLength3D(*(CvPoint3D64f*)&point1, *(CvPoint3D64f*)&point2, (double*)dist.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="alpha"></param>
	/// <param name="betta"></param>
	/// <param name="coeffs"></param>
	/// <returns></returns>
	static int Compute3DPoint(double alpha, double betta, IntPtr coeffs, IntPtr point)
	{
		return icvCompute3DPoint(alpha, betta, (CvStereoLineCoeff*)coeffs.ToPointer(), (CvPoint3D64f*)point.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="rotMatr1"></param>
	/// <param name="transVect1"></param>
	/// <param name="rotMatr2"></param>
	/// <param name="transVect2"></param>
	/// <param name="convRotMatr"></param>
	/// <returns></returns>
	static int CreateConvertMatrVect(IntPtr rotMatr1, IntPtr transVect1, IntPtr rotMatr2, IntPtr transVect2, IntPtr convRotMatr, IntPtr convTransVect)
	{
		return icvCreateConvertMatrVect((CvMatr64d)rotMatr1.ToPointer(), (CvMatr64d)transVect1.ToPointer(), (CvMatr64d)rotMatr2.ToPointer(), (CvMatr64d)transVect2.ToPointer(), (CvMatr64d)convRotMatr.ToPointer(), (CvMatr64d)convTransVect.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="M2"></param>
	/// <param name="M1"></param>
	/// <param name="rotMatr"></param>
	/// <returns></returns>
	static int ConvertPointSystem(NAMESPACE::Point3D64f M2, IntPtr M1, IntPtr rotMatr, IntPtr transVect)
	{
		return icvConvertPointSystem(*(CvPoint3D64f*)&M2, (CvPoint3D64f*)M1.ToPointer(), (CvMatr64d)rotMatr.ToPointer(), (CvMatr64d)transVect.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <returns></returns>
	static int ComputeCoeffForStereo(IntPtr stereoCamera)
	{
		return icvComputeCoeffForStereo((CvStereoCamera*)stereoCamera.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="p1_start"></param>
	/// <param name="p1_end"></param>
	/// <param name="v2_start"></param>
	/// <param name="v2_end"></param>
	/// <returns></returns>
	static int GetCrossPieceVector(NAMESPACE::Point2D32f p1_start, NAMESPACE::Point2D32f p1_end, NAMESPACE::Point2D32f v2_start, NAMESPACE::Point2D32f v2_end, IntPtr cross)
	{
		return icvGetCrossPieceVector(*(CvPoint2D32f*)&p1_start, *(CvPoint2D32f*)&p1_end, *(CvPoint2D32f*)&v2_start, *(CvPoint2D32f*)&v2_end, (CvPoint2D32f*)cross.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="p1"></param>
	/// <param name="p2"></param>
	/// <param name="a"></param>
	/// <param name="b"></param>
	/// <param name="c"></param>
	/// <returns></returns>
	static int GetCrossLineDirect(NAMESPACE::Point2D32f p1, NAMESPACE::Point2D32f p2, float a, float b, float c, IntPtr cross)
	{
		return icvGetCrossLineDirect(*(CvPoint2D32f*)&p1, *(CvPoint2D32f*)&p2, a, b, c, (CvPoint2D32f*)cross.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="point1"></param>
	/// <param name="point2"></param>
	/// <returns></returns>
	static float DefinePointPosition(NAMESPACE::Point2D32f point1, NAMESPACE::Point2D32f point2, NAMESPACE::Point2D32f point)
	{
		return icvDefinePointPosition(*(CvPoint2D32f*)&point1, *(CvPoint2D32f*)&point2, *(CvPoint2D32f*)&point);
	}

	/// <summary>
	/// </summary>
	/// <param name="numImages"></param>
	/// <param name="nums"></param>
	/// <param name="imageSize"></param>
	/// <param name="imagePoints1"></param>
	/// <param name="imagePoints2"></param>
	/// <param name="objectPoints"></param>
	/// <returns></returns>
	static int StereoCalibration(int numImages, IntPtr nums, NAMESPACE::Size2D32s imageSize, IntPtr imagePoints1, IntPtr imagePoints2, IntPtr objectPoints, IntPtr stereoparams)
	{
		return icvStereoCalibration(numImages, (int*)nums.ToPointer(), *(CvSize*)&imageSize, (CvPoint2D32f*)imagePoints1.ToPointer(), (CvPoint2D32f*)imagePoints2.ToPointer(), (CvPoint3D32f*)objectPoints.ToPointer(), (CvStereoCamera*)stereoparams.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <returns></returns>
	static int ComputeRestStereoParams(IntPtr stereoparams)
	{
		return icvComputeRestStereoParams((CvStereoCamera*)stereoparams.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="coeffs[3][3]"></param>
	/// <param name="rectMapX"></param>
	static void ComputePerspectiveMap(double coeffs[3][3], IntPtr rectMapX, IntPtr rectMapY)
	{
		cvComputePerspectiveMap(coeffs, (CvArr*)rectMapX.ToPointer(), (CvArr*)rectMapY.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="point1"></param>
	/// <param name="point2"></param>
	/// <param name="point3"></param>
	/// <param name="point4"></param>
	/// <param name="camMatr1"></param>
	/// <param name="rotMatr1"></param>
	/// <param name="transVect1"></param>
	/// <param name="camMatr2"></param>
	/// <param name="rotMatr2"></param>
	/// <param name="transVect2"></param>
	/// <param name="coeffs"></param>
	/// <returns></returns>
	static int ComCoeffForLine(NAMESPACE::Point2D64f point1, NAMESPACE::Point2D64f point2, NAMESPACE::Point2D64f point3, NAMESPACE::Point2D64f point4, IntPtr camMatr1, IntPtr rotMatr1, IntPtr transVect1, IntPtr camMatr2, IntPtr rotMatr2, IntPtr transVect2, IntPtr coeffs, IntPtr needSwapCameras)
	{
		return icvComCoeffForLine(*(CvPoint2D64f*)&point1, *(CvPoint2D64f*)&point2, *(CvPoint2D64f*)&point3, *(CvPoint2D64f*)&point4, (CvMatr64d)camMatr1.ToPointer(), (CvMatr64d)rotMatr1.ToPointer(), (CvMatr64d)transVect1.ToPointer(), (CvMatr64d)camMatr2.ToPointer(), (CvMatr64d)rotMatr2.ToPointer(), (CvMatr64d)transVect2.ToPointer(), (CvStereoLineCoeff*)coeffs.ToPointer(), (int*)needSwapCameras.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="point"></param>
	/// <param name="camMatr"></param>
	/// <returns></returns>
	static int GetDirectionForPoint(NAMESPACE::Point2D64f point, IntPtr camMatr, IntPtr direct)
	{
		return icvGetDirectionForPoint(*(CvPoint2D64f*)&point, (CvMatr64d)camMatr.ToPointer(), (CvPoint3D64f*)direct.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="point11"></param>
	/// <param name="point12"></param>
	/// <param name="point21"></param>
	/// <param name="point22"></param>
	/// <returns></returns>
	static int GetCrossLines(NAMESPACE::Point3D64f point11, NAMESPACE::Point3D64f point12, NAMESPACE::Point3D64f point21, NAMESPACE::Point3D64f point22, IntPtr midPoint)
	{
		return icvGetCrossLines(*(CvPoint3D64f*)&point11, *(CvPoint3D64f*)&point12, *(CvPoint3D64f*)&point21, *(CvPoint3D64f*)&point22, (CvPoint3D64f*)midPoint.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="pointA"></param>
	/// <param name="pointB"></param>
	/// <param name="pointCam1"></param>
	/// <param name="gamma"></param>
	/// <returns></returns>
	static int ComputeStereoLineCoeffs(NAMESPACE::Point3D64f pointA, NAMESPACE::Point3D64f pointB, NAMESPACE::Point3D64f pointCam1, double gamma, IntPtr coeffs)
	{
		return icvComputeStereoLineCoeffs(*(CvPoint3D64f*)&pointA, *(CvPoint3D64f*)&pointB, *(CvPoint3D64f*)&pointCam1, gamma, (CvStereoLineCoeff*)coeffs.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="startPoint"></param>
	/// <param name="imageSize"></param>
	/// <param name="point1"></param>
	/// <returns></returns>
	static int GetAngleLine(NAMESPACE::Point2D64f startPoint, NAMESPACE::Size2D32s imageSize, IntPtr point1, IntPtr point2)
	{
		return icvGetAngleLine(*(CvPoint2D64f*)&startPoint, *(CvSize*)&imageSize, (CvPoint2D64f*)point1.ToPointer(), (CvPoint2D64f*)point2.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="p_start"></param>
	/// <param name="p_end"></param>
	/// <param name="a"></param>
	/// <param name="b"></param>
	/// <param name="c"></param>
	static void GetCoefForPiece(NAMESPACE::Point2D64f p_start, NAMESPACE::Point2D64f p_end, IntPtr a, IntPtr b, IntPtr c, IntPtr result)
	{
		icvGetCoefForPiece(*(CvPoint2D64f*)&p_start, *(CvPoint2D64f*)&p_end, (double*)a.ToPointer(), (double*)b.ToPointer(), (double*)c.ToPointer(), (int*)result.ToPointer());
	}

	/// <summary>
	/// CVAPI(void) icvGetCommonArea( CvSize imageSize,
	/// CvPoint2D64f epipole1,CvPoint2D64f epipole2,
	/// CvMatr64d fundMatr,
	/// CvVect64d coeff11,CvVect64d coeff12,
	/// CvVect64d coeff21,CvVect64d coeff22,
	/// int* result);
	/// </summary>
	/// <param name="rotMatr"></param>
	/// <param name="camMatr1"></param>
	/// <param name="camMatr2"></param>
	/// <param name="point1"></param>
	static void ComputeeInfiniteProject1(IntPtr rotMatr, IntPtr camMatr1, IntPtr camMatr2, NAMESPACE::Point2D32f point1, IntPtr point2)
	{
		icvComputeeInfiniteProject1((CvMatr64d)rotMatr.ToPointer(), (CvMatr64d)camMatr1.ToPointer(), (CvMatr64d)camMatr2.ToPointer(), *(CvPoint2D32f*)&point1, (CvPoint2D32f*)point2.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="rotMatr"></param>
	/// <param name="camMatr1"></param>
	/// <param name="camMatr2"></param>
	/// <param name="point1"></param>
	static void ComputeeInfiniteProject2(IntPtr rotMatr, IntPtr camMatr1, IntPtr camMatr2, IntPtr point1, NAMESPACE::Point2D32f point2)
	{
		icvComputeeInfiniteProject2((CvMatr64d)rotMatr.ToPointer(), (CvMatr64d)camMatr1.ToPointer(), (CvMatr64d)camMatr2.ToPointer(), (CvPoint2D32f*)point1.ToPointer(), *(CvPoint2D32f*)&point2);
	}

	/// <summary>
	/// </summary>
	/// <param name="direct1"></param>
	/// <param name="direct2"></param>
	/// <param name="cross"></param>
	static void GetCrossDirectDirect(IntPtr direct1, IntPtr direct2, IntPtr cross, IntPtr result)
	{
		icvGetCrossDirectDirect((CvVect64d)direct1.ToPointer(), (CvVect64d)direct2.ToPointer(), (CvPoint2D64f*)cross.ToPointer(), (int*)result.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="p_start"></param>
	/// <param name="p_end"></param>
	/// <param name="a"></param>
	/// <param name="b"></param>
	/// <param name="c"></param>
	/// <param name="cross"></param>
	static void GetCrossPieceDirect(NAMESPACE::Point2D64f p_start, NAMESPACE::Point2D64f p_end, double a, double b, double c, IntPtr cross, IntPtr result)
	{
		icvGetCrossPieceDirect(*(CvPoint2D64f*)&p_start, *(CvPoint2D64f*)&p_end, a, b, c, (CvPoint2D64f*)cross.ToPointer(), (int*)result.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="p1_start"></param>
	/// <param name="p1_end"></param>
	/// <param name="p2_start"></param>
	/// <param name="p2_end"></param>
	/// <param name="cross"></param>
	static void GetCrossPiecePiece(NAMESPACE::Point2D64f p1_start, NAMESPACE::Point2D64f p1_end, NAMESPACE::Point2D64f p2_start, NAMESPACE::Point2D64f p2_end, IntPtr cross, IntPtr result)
	{
		icvGetCrossPiecePiece(*(CvPoint2D64f*)&p1_start, *(CvPoint2D64f*)&p1_end, *(CvPoint2D64f*)&p2_start, *(CvPoint2D64f*)&p2_end, (CvPoint2D64f*)cross.ToPointer(), (int*)result.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="point1"></param>
	/// <param name="point2"></param>
	static void GetPieceLength(NAMESPACE::Point2D64f point1, NAMESPACE::Point2D64f point2, IntPtr dist)
	{
		icvGetPieceLength(*(CvPoint2D64f*)&point1, *(CvPoint2D64f*)&point2, (double*)dist.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="imageSize"></param>
	/// <param name="a"></param>
	/// <param name="b"></param>
	/// <param name="c"></param>
	/// <param name="start"></param>
	/// <param name="end"></param>
	static void GetCrossRectDirect(NAMESPACE::Size2D32s imageSize, double a, double b, double c, IntPtr start, IntPtr end, IntPtr result)
	{
		icvGetCrossRectDirect(*(CvSize*)&imageSize, a, b, c, (CvPoint2D64f*)start.ToPointer(), (CvPoint2D64f*)end.ToPointer(), (int*)result.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="point"></param>
	/// <param name="camMatr"></param>
	/// <param name="rotMatr"></param>
	/// <param name="transVect"></param>
	static void ProjectPointToImage(NAMESPACE::Point3D64f point, IntPtr camMatr, IntPtr rotMatr, IntPtr transVect, IntPtr projPoint)
	{
		icvProjectPointToImage(*(CvPoint3D64f*)&point, (CvMatr64d)camMatr.ToPointer(), (CvMatr64d)rotMatr.ToPointer(), (CvVect64d)transVect.ToPointer(), (CvPoint2D64f*)projPoint.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="imageSize"></param>
	/// <param name="camMatr1"></param>
	/// <param name="rotMatr1"></param>
	/// <param name="transVect1"></param>
	/// <param name="camMatr2"></param>
	/// <param name="rotMatr2"></param>
	/// <param name="transVect2"></param>
	/// <param name="warpSize"></param>
	/// <param name="quad1[4][2]"></param>
	/// <param name="quad2[4][2]"></param>
	/// <param name="fundMatr"></param>
	/// <param name="epipole1"></param>
	static void GetQuadsTransform(NAMESPACE::Size2D32s imageSize, IntPtr camMatr1, IntPtr rotMatr1, IntPtr transVect1, IntPtr camMatr2, IntPtr rotMatr2, IntPtr transVect2, IntPtr warpSize, double quad1[4][2], double quad2[4][2], IntPtr fundMatr, IntPtr epipole1, IntPtr epipole2)
	{
		icvGetQuadsTransform(*(CvSize*)&imageSize, (CvMatr64d)camMatr1.ToPointer(), (CvMatr64d)rotMatr1.ToPointer(), (CvVect64d)transVect1.ToPointer(), (CvMatr64d)camMatr2.ToPointer(), (CvMatr64d)rotMatr2.ToPointer(), (CvVect64d)transVect2.ToPointer(), (CvSize*)warpSize.ToPointer(), quad1, quad2, (CvMatr64d)fundMatr.ToPointer(), (CvPoint3D64f*)epipole1.ToPointer(), (CvPoint3D64f*)epipole2.ToPointer());
	}

	/// <summary>
	/// </summary>
	static void GetQuadsTransformStruct(IntPtr stereoCamera)
	{
		icvGetQuadsTransformStruct((CvStereoCamera*)stereoCamera.ToPointer());
	}

	/// <summary>
	/// </summary>
	static void ComputeStereoParamsForCameras(IntPtr stereoCamera)
	{
		icvComputeStereoParamsForCameras((CvStereoCamera*)stereoCamera.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="areaLineCoef1"></param>
	/// <param name="areaLineCoef2"></param>
	/// <param name="epipole"></param>
	/// <param name="imageSize"></param>
	/// <param name="point11"></param>
	/// <param name="point12"></param>
	/// <param name="point21"></param>
	/// <param name="point22"></param>
	static void GetCutPiece(IntPtr areaLineCoef1, IntPtr areaLineCoef2, NAMESPACE::Point2D64f epipole, NAMESPACE::Size2D32s imageSize, IntPtr point11, IntPtr point12, IntPtr point21, IntPtr point22, IntPtr result)
	{
		icvGetCutPiece((CvVect64d)areaLineCoef1.ToPointer(), (CvVect64d)areaLineCoef2.ToPointer(), *(CvPoint2D64f*)&epipole, *(CvSize*)&imageSize, (CvPoint2D64f*)point11.ToPointer(), (CvPoint2D64f*)point12.ToPointer(), (CvPoint2D64f*)point21.ToPointer(), (CvPoint2D64f*)point22.ToPointer(), (int*)result.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="basePoint"></param>
	/// <param name="point1"></param>
	/// <param name="point2"></param>
	static void GetMiddleAnglePoint(NAMESPACE::Point2D64f basePoint, NAMESPACE::Point2D64f point1, NAMESPACE::Point2D64f point2, IntPtr midPoint)
	{
		icvGetMiddleAnglePoint(*(CvPoint2D64f*)&basePoint, *(CvPoint2D64f*)&point1, *(CvPoint2D64f*)&point2, (CvPoint2D64f*)midPoint.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="direct"></param>
	/// <param name="point"></param>
	static void GetNormalDirect(IntPtr direct, NAMESPACE::Point2D64f point, IntPtr normDirect)
	{
		icvGetNormalDirect((CvVect64d)direct.ToPointer(), *(CvPoint2D64f*)&point, (CvVect64d)normDirect.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="basePoint"></param>
	/// <param name="point1"></param>
	/// <returns></returns>
	static double GetVect(NAMESPACE::Point2D64f basePoint, NAMESPACE::Point2D64f point1, NAMESPACE::Point2D64f point2)
	{
		return icvGetVect(*(CvPoint2D64f*)&basePoint, *(CvPoint2D64f*)&point1, *(CvPoint2D64f*)&point2);
	}

	/// <summary>
	/// </summary>
	/// <param name="point"></param>
	/// <param name="lineCoeff"></param>
	static void ProjectPointToDirect(NAMESPACE::Point2D64f point, IntPtr lineCoeff, IntPtr projectPoint)
	{
		icvProjectPointToDirect(*(CvPoint2D64f*)&point, (CvVect64d)lineCoeff.ToPointer(), (CvPoint2D64f*)projectPoint.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="point"></param>
	/// <param name="lineCoef"></param>
	static void GetDistanceFromPointToDirect(NAMESPACE::Point2D64f point, IntPtr lineCoef, IntPtr dist)
	{
		icvGetDistanceFromPointToDirect(*(CvPoint2D64f*)&point, (CvVect64d)lineCoef.ToPointer(), (double*)dist.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="src"></param>
	/// <param name="dst"></param>
	/// <param name="desired_depth"></param>
	/// <returns></returns>
	static IntPtr CreateIsometricImage(IntPtr src, IntPtr dst, PixelDepth desired_depth, int desired_num_channels)
	{
		return IntPtr(icvCreateIsometricImage((IplImage*)src.ToPointer(), (IplImage*)dst.ToPointer(), (int)desired_depth, desired_num_channels));
	}

	/// <summary>
	/// </summary>
	/// <param name="frame"></param>
	/// <param name="fieldEven"></param>
	static void DeInterlace(IntPtr frame, IntPtr fieldEven, IntPtr fieldOdd)
	{
		cvDeInterlace((CvArr*)frame.ToPointer(), (CvArr*)fieldEven.ToPointer(), (CvArr*)fieldOdd.ToPointer());
	}

	/// <summary>
	/// finds correspondence between two contours
	/// </summary>
	/// <param name="frame"></param>
	/// <param name="fieldEven"></param>
	static IntPtr CalcContoursCorrespondence(IntPtr contour1, IntPtr contour2, IntPtr storage)
	{
		throw gcnew System::NotSupportedException();
		// return IntPtr(cvCalcContoursCorrespondence((CvSeq*)contour1.ToPointer(), (CvSeq*)contour2.ToPointer(), (CvMemStorage*)storage.ToPointer()));
	}

	/// <summary>
	/// morphs contours using the pre-calculated correspondence
	/// alpha=0 ~ contour1, alpha=1 ~ contour2
	/// </summary>
	/// <param name="frame"></param>
	/// <param name="fieldEven"></param>
	static IntPtr MorphContours(IntPtr contour1, IntPtr contour2, IntPtr corr, double alpha, IntPtr storage )
	{
		throw gcnew System::NotSupportedException();
		// return IntPtr(cvMorphContours((CvSeq*)contour1.ToPointer(), (CvSeq*)contour2.ToPointer(), (CvSeq*)corr.ToPointer(), alpha, (CvMemStorage*)storage.ToPointer()));
	}

	/// <summary>
	/// </summary>
	/// <param name="srcImage"></param>
	/// <param name="stepMagnitude"></param>
	/// <param name="stepDirections"></param>
	/// <param name="numStepDirections"></param>
	/// <returns></returns>
	static IntPtr CreateGLCM(IntPtr srcImage, int stepMagnitude, IntPtr stepDirections, int numStepDirections, GLCMOptimizationType optimizationType)
	{
		return IntPtr(cvCreateGLCM((IplImage*)srcImage.ToPointer(), stepMagnitude, (int*)stepDirections.ToPointer(), numStepDirections, (int)optimizationType));
	}

	/// <summary>
	/// </summary>
	/// <param name="srcImage"></param>
	/// <param name="stepMagnitude"></param>
	/// <param name="stepDirections"></param>
	/// <returns></returns>
	static IntPtr CreateGLCM(IntPtr srcImage, int stepMagnitude, IntPtr stepDirections, int numStepDirections)
	{
		return IntPtr(cvCreateGLCM((IplImage*)srcImage.ToPointer(), stepMagnitude, (int*)stepDirections.ToPointer(), numStepDirections));
	}

	/// <summary>
	/// </summary>
	/// <param name="srcImage"></param>
	/// <param name="stepMagnitude"></param>
	/// <returns></returns>
	static IntPtr CreateGLCM(IntPtr srcImage, int stepMagnitude, IntPtr stepDirections)
	{
		return IntPtr(cvCreateGLCM((IplImage*)srcImage.ToPointer(), stepMagnitude, (int*)stepDirections.ToPointer()));
	}

	/// <summary>
	/// </summary>
	/// <param name="srcImage"></param>
	/// <returns></returns>
	static IntPtr CreateGLCM(IntPtr srcImage, int stepMagnitude)
	{
		return IntPtr(cvCreateGLCM((IplImage*)srcImage.ToPointer(), stepMagnitude));
	}

	/// <summary>
	/// </summary>
	/// <param name="GLCM"></param>
	static void ReleaseGLCM(IntPtr GLCM, GLCMReleaseFlag flag)
	{
		cvReleaseGLCM((CvGLCM**)GLCM.ToPointer(), (int)flag);
	}

	/// <summary>
	/// </summary>
	static void ReleaseGLCM(IntPtr GLCM)
	{
		cvReleaseGLCM((CvGLCM**)GLCM.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="destGLCM"></param>
	static void CreateGLCMDescriptors(IntPtr destGLCM, GLCMDescOptimizationType descriptorOptimizationType)
	{
		cvCreateGLCMDescriptors((CvGLCM*)destGLCM.ToPointer(), (int)descriptorOptimizationType);
	}

	/// <summary>
	/// </summary>
	static void CreateGLCMDescriptors(IntPtr destGLCM)
	{
		cvCreateGLCMDescriptors((CvGLCM*)destGLCM.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="GLCM"></param>
	/// <param name="step"></param>
	/// <returns></returns>
	static double GetGLCMDescriptor(IntPtr GLCM, int step, GLCMDescType descriptor)
	{
		return cvGetGLCMDescriptor((CvGLCM*)GLCM.ToPointer(), step, (int)descriptor);
	}

	/// <summary>
	/// </summary>
	/// <param name="GLCM"></param>
	/// <param name="descriptor"></param>
	/// <param name="average"></param>
	static void GetGLCMDescriptorStatistics(IntPtr GLCM, GLCMDescType descriptor, IntPtr average, IntPtr standardDeviation)
	{
		cvGetGLCMDescriptorStatistics((CvGLCM*)GLCM.ToPointer(), (int)descriptor, (double*)average.ToPointer(), (double*)standardDeviation.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="GLCM"></param>
	/// <returns></returns>
	static IntPtr CreateGLCMImage(IntPtr GLCM, int step)
	{
		return IntPtr(cvCreateGLCMImage((CvGLCM*)GLCM.ToPointer(), step));
	}

	/// <summary>
	/// </summary>
	/// <param name="pFaceTracking"></param>
	/// <param name="imgGray"></param>
	/// <param name="pRects"></param>
	/// <returns></returns>
	static IntPtr InitFaceTracker(IntPtr pFaceTracking, IntPtr imgGray, IntPtr pRects, int nRects)
	{
		return IntPtr(cvInitFaceTracker((CvFaceTracker*)pFaceTracking.ToPointer(), (IplImage*)imgGray.ToPointer(), (CvRect*)pRects.ToPointer(), nRects));
	}

	/// <summary>
	/// </summary>
	/// <param name="pFaceTracker"></param>
	/// <param name="imgGray"></param>
	/// <param name="pRects"></param>
	/// <param name="nRects"></param>
	/// <param name="ptRotate"></param>
	/// <returns></returns>
	static int TrackFace(IntPtr pFaceTracker, IntPtr imgGray, IntPtr pRects, int nRects, IntPtr ptRotate, IntPtr dbAngleRotate)
	{
		return cvTrackFace((CvFaceTracker*)pFaceTracker.ToPointer(), (IplImage*)imgGray.ToPointer(), (CvRect*)pRects.ToPointer(), nRects, (CvPoint*)ptRotate.ToPointer(), (double*)dbAngleRotate.ToPointer());
	}

	/// <summary>
	/// </summary>
	static void ReleaseFaceTracker(IntPtr ppFaceTracker)
	{
		cvReleaseFaceTracker((CvFaceTracker**)ppFaceTracker.ToPointer());
	}

	/// <summary>
	/// </summary>
	static IntPtr FindFace(IntPtr Image, IntPtr storage)
	{
		throw gcnew System::NotSupportedException();
		// return IntPtr(cvFindFace((IplImage*)Image.ToPointer(), (CvMemStorage*)storage.ToPointer()));
	}

	/// <summary>
	/// </summary>
	static IntPtr PostBoostingFindFace(IntPtr Image,IntPtr storage)
	{
		throw gcnew System::NotSupportedException();
		// return IntPtr(cvPostBoostingFindFace((IplImage*)Image.ToPointer(), (CvMemStorage*)storage.ToPointer()));
	}

	/// <summary>
	/// </summary>
	/// <param name="num_cameras"></param>
	/// <param name="camera_intrinsics[]"></param>
	/// <param name="etalon_size"></param>
	/// <param name="square_size"></param>
	/// <param name="samples[]"></param>
	/// <returns></returns>
	static bool TrackerCalibrateCameras_3D(int num_cameras, IntPtr camera_intrinsics, NAMESPACE::Size2D32s etalon_size, float square_size, IntPtr samples, IntPtr camera_info)
	{
		return 0 != cv3dTrackerCalibrateCameras(num_cameras, (Cv3dTrackerCameraIntrinsics*)camera_intrinsics.ToPointer(), *(CvSize*)&etalon_size, square_size, (IplImage**)samples.ToPointer(), (Cv3dTrackerCameraInfo*)camera_info.ToPointer());
	}

	/// <summary>
	/// size is num_cameras
	/// </summary>
	/// <param name="num_cameras"></param>
	/// <param name="num_objects"></param>
	/// <param name="camera_info[]"></param>
	/// <param name="tracking_info[]"></param>
	/// <returns></returns>
	static int TrackerLocateObjects_3D(int num_cameras, int num_objects, IntPtr camera_info, IntPtr tracking_info, IntPtr tracked_objects)
	{
		return cv3dTrackerLocateObjects(num_cameras, num_objects, (Cv3dTrackerCameraInfo*)camera_info.ToPointer(), (Cv3dTracker2dTrackedObject*)tracking_info.ToPointer(), (Cv3dTrackerTrackedObject*)tracked_objects.ToPointer());
	}

	/// <summary>
	/// Computes Voronoi Diagram for given polygons with holes
	/// </summary>
	/// <param name="ContourSeq"></param>
	/// <param name="VoronoiDiagram"></param>
	/// <param name="VoronoiStorage"></param>
	/// <param name="contour_type"></param>
	/// <param name="contour_orientation"></param>
	/// <returns></returns>
	static int VoronoiDiagramFromContour(IntPtr ContourSeq, IntPtr VoronoiDiagram, IntPtr VoronoiStorage, NAMESPACE::LeeParameters contour_type, int contour_orientation, int attempt_number)
	{
		return cvVoronoiDiagramFromContour((CvSeq*)ContourSeq.ToPointer(), (CvVoronoiDiagram2D**)VoronoiDiagram.ToPointer(), (CvMemStorage*)VoronoiStorage.ToPointer(), *(CvLeeParameters*)&contour_type, contour_orientation, attempt_number);
	}

	/// <summary>
	/// Computes Voronoi Diagram for given polygons with holes
	/// </summary>
	/// <param name="ContourSeq"></param>
	/// <param name="VoronoiDiagram"></param>
	/// <param name="VoronoiStorage"></param>
	/// <param name="contour_type"></param>
	/// <returns></returns>
	static int VoronoiDiagramFromContour(IntPtr ContourSeq, IntPtr VoronoiDiagram, IntPtr VoronoiStorage, NAMESPACE::LeeParameters contour_type, int contour_orientation)
	{
		return cvVoronoiDiagramFromContour((CvSeq*)ContourSeq.ToPointer(), (CvVoronoiDiagram2D**)VoronoiDiagram.ToPointer(), (CvMemStorage*)VoronoiStorage.ToPointer(), *(CvLeeParameters*)&contour_type, contour_orientation);
	}

	/// <summary>
	/// Computes Voronoi Diagram for given polygons with holes
	/// </summary>
	/// <param name="ContourSeq"></param>
	/// <param name="VoronoiDiagram"></param>
	/// <param name="VoronoiStorage"></param>
	/// <returns></returns>
	static int VoronoiDiagramFromContour(IntPtr ContourSeq, IntPtr VoronoiDiagram, IntPtr VoronoiStorage, NAMESPACE::LeeParameters contour_type)
	{
		return cvVoronoiDiagramFromContour((CvSeq*)ContourSeq.ToPointer(), (CvVoronoiDiagram2D**)VoronoiDiagram.ToPointer(), (CvMemStorage*)VoronoiStorage.ToPointer(), *(CvLeeParameters*)&contour_type);
	}

	/// <summary>
	/// Computes Voronoi Diagram for given polygons with holes
	/// </summary>
	/// <param name="ContourSeq"></param>
	/// <param name="VoronoiDiagram"></param>
	/// <returns></returns>
	static int VoronoiDiagramFromContour(IntPtr ContourSeq, IntPtr VoronoiDiagram, IntPtr VoronoiStorage)
	{
		return cvVoronoiDiagramFromContour((CvSeq*)ContourSeq.ToPointer(), (CvVoronoiDiagram2D**)VoronoiDiagram.ToPointer(), (CvMemStorage*)VoronoiStorage.ToPointer());
	}

	/// <summary>
	/// Computes Voronoi Diagram for domains in given image
	/// </summary>
	/// <param name="pImage"></param>
	/// <param name="ContourSeq"></param>
	/// <param name="VoronoiDiagram"></param>
	/// <param name="VoronoiStorage"></param>
	/// <param name="regularization_method"></param>
	/// <returns></returns>
	static int VoronoiDiagramFromImage(IntPtr pImage, IntPtr ContourSeq, IntPtr VoronoiDiagram, IntPtr VoronoiStorage, NAMESPACE::LeeParameters regularization_method, float approx_precision)
	{
		return cvVoronoiDiagramFromImage((IplImage*)pImage.ToPointer(), (CvSeq**)ContourSeq.ToPointer(), (CvVoronoiDiagram2D**)VoronoiDiagram.ToPointer(), (CvMemStorage*)VoronoiStorage.ToPointer(), *(CvLeeParameters*)&regularization_method, approx_precision);
	}

	/// <summary>
	/// Computes Voronoi Diagram for domains in given image
	/// </summary>
	/// <param name="pImage"></param>
	/// <param name="ContourSeq"></param>
	/// <param name="VoronoiDiagram"></param>
	/// <param name="VoronoiStorage"></param>
	/// <returns></returns>
	static int VoronoiDiagramFromImage(IntPtr pImage, IntPtr ContourSeq, IntPtr VoronoiDiagram, IntPtr VoronoiStorage, NAMESPACE::LeeParameters regularization_method)
	{
		return cvVoronoiDiagramFromImage((IplImage*)pImage.ToPointer(), (CvSeq**)ContourSeq.ToPointer(), (CvVoronoiDiagram2D**)VoronoiDiagram.ToPointer(), (CvMemStorage*)VoronoiStorage.ToPointer(), *(CvLeeParameters*)&regularization_method);
	}

	/// <summary>
	/// Computes Voronoi Diagram for domains in given image
	/// </summary>
	/// <param name="pImage"></param>
	/// <param name="ContourSeq"></param>
	/// <param name="VoronoiDiagram"></param>
	/// <returns></returns>
	static int VoronoiDiagramFromImage(IntPtr pImage, IntPtr ContourSeq, IntPtr VoronoiDiagram, IntPtr VoronoiStorage)
	{
		return cvVoronoiDiagramFromImage((IplImage*)pImage.ToPointer(), (CvSeq**)ContourSeq.ToPointer(), (CvVoronoiDiagram2D**)VoronoiDiagram.ToPointer(), (CvMemStorage*)VoronoiStorage.ToPointer());
	}

	/// <summary>
	/// Deallocates the storage
	/// </summary>
	/// <param name="VoronoiDiagram"></param>
	static void ReleaseVoronoiStorage(IntPtr VoronoiDiagram, IntPtr pVoronoiStorage)
	{
		cvReleaseVoronoiStorage((CvVoronoiDiagram2D*)VoronoiDiagram.ToPointer(), (CvMemStorage**)pVoronoiStorage.ToPointer());
	}

	/// <summary>
	/// Computes hybrid model from Voronoi Diagram
	/// </summary>
	/// <param name="VoronoiDiagram"></param>
	/// <returns></returns>
	static IntPtr LinearContorModelFromVoronoiDiagram(IntPtr VoronoiDiagram, float maxWidth)
	{
		return IntPtr(cvLinearContorModelFromVoronoiDiagram((CvVoronoiDiagram2D*)VoronoiDiagram.ToPointer(), maxWidth));
	}

	/// <summary>
	/// Releases hybrid model storage
	/// </summary>
	/// <returns></returns>
	static int ReleaseLinearContorModelStorage(IntPtr Graph)
	{
		return cvReleaseLinearContorModelStorage((CvGraph**)Graph.ToPointer());
	}

	/// <summary>
	/// two stereo-related functions
	/// </summary>
	/// <param name="size"></param>
	/// <param name="vertex[4]"></param>
	/// <param name="matrix[3][3]"></param>
	static void InitPerspectiveTransform(NAMESPACE::Size2D32s size, IntPtr vertex, double matrix[3][3], IntPtr rectMap)
	{
		cvInitPerspectiveTransform(*(CvSize*)&size, (CvPoint2D32f*)vertex.ToPointer(), matrix, (CvArr*)rectMap.ToPointer());
	}

	/// <summary>
	/// Finds ending points of scanlines on left and right images of stereo-pair
	/// </summary>
	/// <param name="matrix"></param>
	/// <param name="img_size"></param>
	/// <param name="scanlines1"></param>
	/// <param name="scanlines2"></param>
	/// <param name="lengths1"></param>
	/// <param name="lengths2"></param>
	static void MakeScanlines(IntPtr matrix, NAMESPACE::Size2D32s img_size, IntPtr scanlines1, IntPtr scanlines2, IntPtr lengths1, IntPtr lengths2, IntPtr line_count)
	{
		cvMakeScanlines((CvMatrix3*)matrix.ToPointer(), *(CvSize*)&img_size, (int*)scanlines1.ToPointer(), (int*)scanlines2.ToPointer(), (int*)lengths1.ToPointer(), (int*)lengths2.ToPointer(), (int*)line_count.ToPointer());
	}

	/// <summary>
	/// Grab pixel values from scanlines and stores them sequentially
	/// (some sort of perspective image transform)
	/// </summary>
	/// <param name="line_count"></param>
	/// <param name="img"></param>
	/// <param name="dst"></param>
	/// <param name="dst_nums"></param>
	static void PreWarpImage(int line_count, IntPtr img, IntPtr dst, IntPtr dst_nums, IntPtr scanlines)
	{
		cvPreWarpImage(line_count, (IplImage*)img.ToPointer(), (uchar*)dst.ToPointer(), (int*)dst_nums.ToPointer(), (int*)scanlines.ToPointer());
	}

	/// <summary>
	/// Approximate each grabbed scanline by a sequence of runs
	/// (lossy run-length compression)
	/// </summary>
	/// <param name="line_count"></param>
	/// <param name="prewarp1"></param>
	/// <param name="prewarp2"></param>
	/// <param name="line_lengths1"></param>
	/// <param name="line_lengths2"></param>
	/// <param name="runs1"></param>
	/// <param name="runs2"></param>
	/// <param name="num_runs1"></param>
	static void FindRuns(int line_count, IntPtr prewarp1, IntPtr prewarp2, IntPtr line_lengths1, IntPtr line_lengths2, IntPtr runs1, IntPtr runs2, IntPtr num_runs1, IntPtr num_runs2)
	{
		cvFindRuns(line_count, (uchar*)prewarp1.ToPointer(), (uchar*)prewarp2.ToPointer(), (int*)line_lengths1.ToPointer(), (int*)line_lengths2.ToPointer(), (int*)runs1.ToPointer(), (int*)runs2.ToPointer(), (int*)num_runs1.ToPointer(), (int*)num_runs2.ToPointer());
	}

	/// <summary>
	/// Compares two sets of compressed scanlines
	/// </summary>
	/// <param name="line_count"></param>
	/// <param name="first"></param>
	/// <param name="first_runs"></param>
	/// <param name="second"></param>
	/// <param name="second_runs"></param>
	/// <param name="first_corr"></param>
	static void DynamicCorrespondMulti(int line_count, IntPtr first, IntPtr first_runs, IntPtr second, IntPtr second_runs, IntPtr first_corr, IntPtr second_corr)
	{
		cvDynamicCorrespondMulti(line_count, (int*)first.ToPointer(), (int*)first_runs.ToPointer(), (int*)second.ToPointer(), (int*)second_runs.ToPointer(), (int*)first_corr.ToPointer(), (int*)second_corr.ToPointer());
	}

	/// <summary>
	/// Finds scanline ending coordinates for some intermediate "virtual" camera position
	/// </summary>
	/// <param name="scanlines1"></param>
	/// <param name="scanlines2"></param>
	/// <param name="scanlinesA"></param>
	/// <param name="lengths"></param>
	/// <param name="line_count"></param>
	static void MakeAlphaScanlines(IntPtr scanlines1, IntPtr scanlines2, IntPtr scanlinesA, IntPtr lengths, int line_count, float alpha)
	{
		cvMakeAlphaScanlines((int*)scanlines1.ToPointer(), (int*)scanlines2.ToPointer(), (int*)scanlinesA.ToPointer(), (int*)lengths.ToPointer(), line_count, alpha);
	}

	/// <summary>
	/// Blends data of the left and right image scanlines to get
	/// pixel values of "virtual" image scanlines
	/// </summary>
	/// <param name="line_count"></param>
	/// <param name="first_pix"></param>
	/// <param name="first_num"></param>
	/// <param name="second_pix"></param>
	/// <param name="second_num"></param>
	/// <param name="dst_pix"></param>
	/// <param name="dst_num"></param>
	/// <param name="alpha"></param>
	/// <param name="first"></param>
	/// <param name="first_runs"></param>
	/// <param name="second"></param>
	/// <param name="second_runs"></param>
	/// <param name="first_corr"></param>
	static void MorphEpilinesMulti(int line_count, IntPtr first_pix, IntPtr first_num, IntPtr second_pix, IntPtr second_num, IntPtr dst_pix, IntPtr dst_num, float alpha, IntPtr first, IntPtr first_runs, IntPtr second, IntPtr second_runs, IntPtr first_corr, IntPtr second_corr)
	{
		cvMorphEpilinesMulti(line_count, (uchar*)first_pix.ToPointer(), (int*)first_num.ToPointer(), (uchar*)second_pix.ToPointer(), (int*)second_num.ToPointer(), (uchar*)dst_pix.ToPointer(), (int*)dst_num.ToPointer(), alpha, (int*)first.ToPointer(), (int*)first_runs.ToPointer(), (int*)second.ToPointer(), (int*)second_runs.ToPointer(), (int*)first_corr.ToPointer(), (int*)second_corr.ToPointer());
	}

	/// <summary>
	/// Does reverse warping of the morphing result to make
	/// it fill the destination image rectangle
	/// </summary>
	/// <param name="line_count"></param>
	/// <param name="src"></param>
	/// <param name="src_nums"></param>
	/// <param name="img"></param>
	static void PostWarpImage(int line_count, IntPtr src, IntPtr src_nums, IntPtr img, IntPtr scanlines)
	{
		cvPostWarpImage(line_count, (uchar*)src.ToPointer(), (int*)src_nums.ToPointer(), (IplImage*)img.ToPointer(), (int*)scanlines.ToPointer());
	}

	/// <summary>
	/// Deletes Moire (missed pixels that appear due to discretization)
	/// </summary>
	static void DeleteMoire(IntPtr img)
	{
		cvDeleteMoire((IplImage*)img.ToPointer());
	}

	/// <summary>
	/// Performs FG post-processing using segmentation
	/// (all pixels of a region will be classified as foreground if majority of pixels of the region are FG).
	/// parameters:
	/// segments - pointer to result of segmentation (for example MeanShiftSegmentation)
	/// bg_model - pointer to CvBGStatModel structure
	/// </summary>
	/// <param name="segments"></param>
	static void RefineForegroundMaskBySegm(IntPtr segments, IntPtr bg_model)
	{
		cvRefineForegroundMaskBySegm((CvSeq*)segments.ToPointer(), (CvBGStatModel*)bg_model.ToPointer());
	}

	/// <summary>
	/// Common use change detection function
	/// </summary>
	/// <param name="prev_frame"></param>
	/// <param name="curr_frame"></param>
	/// <returns></returns>
	static int ChangeDetection(IntPtr prev_frame, IntPtr curr_frame, IntPtr change_mask)
	{
		return cvChangeDetection((IplImage*)prev_frame.ToPointer(), (IplImage*)curr_frame.ToPointer(), (IplImage*)change_mask.ToPointer());
	}

	/// <summary>
	/// Creates FGD model
	/// </summary>
	/// <param name="first_frame"></param>
	/// <returns></returns>
	static IntPtr CreateFGDStatModel(IntPtr first_frame, IntPtr parameters)
	{
		return IntPtr(cvCreateFGDStatModel((IplImage*)first_frame.ToPointer(), (CvFGDStatModelParams*)parameters.ToPointer()));
	}

	/// <summary>
	/// Creates FGD model
	/// </summary>
	/// <returns></returns>
	static IntPtr CreateFGDStatModel(IntPtr first_frame)
	{
		return IntPtr(cvCreateFGDStatModel((IplImage*)first_frame.ToPointer()));
	}

	/// <summary>
	/// Creates Gaussian mixture background model
	/// </summary>
	/// <param name="first_frame"></param>
	/// <returns></returns>
	static IntPtr CreateGaussianBGModel(IntPtr first_frame, IntPtr parameters)
	{
		return IntPtr(cvCreateGaussianBGModel((IplImage*)first_frame.ToPointer(), (CvGaussBGStatModelParams*)parameters.ToPointer()));
	}

	/// <summary>
	/// Creates Gaussian mixture background model
	/// </summary>
	/// <returns></returns>
	static IntPtr CreateGaussianBGModel(IntPtr first_frame)
	{
		return IntPtr(cvCreateGaussianBGModel((IplImage*)first_frame.ToPointer()));
	}

	/// <summary>
	/// </summary>
	/// <returns></returns>
	static IntPtr CreateBGCodeBookModel()
	{
		return IntPtr(cvCreateBGCodeBookModel());
	}

	/// <summary>
	/// </summary>
	static void ReleaseBGCodeBookModel(IntPtr model)
	{
		cvReleaseBGCodeBookModel((CvBGCodeBookModel**)model.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="model"></param>
	/// <param name="image"></param>
	/// <param name="roi"></param>
	static void BGCodeBookUpdate(IntPtr model, IntPtr image, NAMESPACE::Rect roi, IntPtr mask)
	{
		cvBGCodeBookUpdate((CvBGCodeBookModel*)model.ToPointer(), (CvArr*)image.ToPointer(), *(CvRect*)&roi, (CvArr*)mask.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="model"></param>
	/// <param name="image"></param>
	static void BGCodeBookUpdate(IntPtr model, IntPtr image, NAMESPACE::Rect roi)
	{
		cvBGCodeBookUpdate((CvBGCodeBookModel*)model.ToPointer(), (CvArr*)image.ToPointer(), *(CvRect*)&roi);
	}

	/// <summary>
	/// </summary>
	/// <param name="model"></param>
	static void BGCodeBookUpdate(IntPtr model, IntPtr image)
	{
		cvBGCodeBookUpdate((CvBGCodeBookModel*)model.ToPointer(), (CvArr*)image.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="model"></param>
	/// <param name="image"></param>
	/// <param name="fgmask"></param>
	/// <returns></returns>
	static int BGCodeBookDiff(IntPtr model, IntPtr image, IntPtr fgmask, NAMESPACE::Rect roi)
	{
		return cvBGCodeBookDiff((CvBGCodeBookModel*)model.ToPointer(), (CvArr*)image.ToPointer(), (CvArr*)fgmask.ToPointer(), *(CvRect*)&roi);
	}

	/// <summary>
	/// </summary>
	/// <param name="model"></param>
	/// <param name="image"></param>
	/// <returns></returns>
	static int BGCodeBookDiff(IntPtr model, IntPtr image, IntPtr fgmask)
	{
		return cvBGCodeBookDiff((CvBGCodeBookModel*)model.ToPointer(), (CvArr*)image.ToPointer(), (CvArr*)fgmask.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="model"></param>
	/// <param name="staleThresh"></param>
	/// <param name="roi"></param>
	static void BGCodeBookClearStale(IntPtr model, int staleThresh, NAMESPACE::Rect roi, IntPtr mask)
	{
		cvBGCodeBookClearStale((CvBGCodeBookModel*)model.ToPointer(), staleThresh, *(CvRect*)&roi, (CvArr*)mask.ToPointer());
	}

	/// <summary>
	/// </summary>
	/// <param name="model"></param>
	/// <param name="staleThresh"></param>
	static void BGCodeBookClearStale(IntPtr model, int staleThresh, NAMESPACE::Rect roi)
	{
		cvBGCodeBookClearStale((CvBGCodeBookModel*)model.ToPointer(), staleThresh, *(CvRect*)&roi);
	}

	/// <summary>
	/// </summary>
	/// <param name="model"></param>
	static void BGCodeBookClearStale(IntPtr model, int staleThresh)
	{
		cvBGCodeBookClearStale((CvBGCodeBookModel*)model.ToPointer(), staleThresh);
	}

	/// <summary>
	/// </summary>
	/// <param name="fgmask"></param>
	/// <param name="poly1Hull0"></param>
	/// <param name="perimScale"></param>
	/// <param name="storage"></param>
	/// <returns></returns>
	static IntPtr SegmentFGMask(IntPtr fgmask, int poly1Hull0, float perimScale, IntPtr storage, NAMESPACE::Point2D32s offset)
	{
		return IntPtr(cvSegmentFGMask((CvArr*)fgmask.ToPointer(), poly1Hull0, perimScale, (CvMemStorage*)storage.ToPointer(), *(CvPoint*)&offset));
	}

	/// <summary>
	/// </summary>
	/// <param name="fgmask"></param>
	/// <param name="poly1Hull0"></param>
	/// <param name="perimScale"></param>
	/// <returns></returns>
	static IntPtr SegmentFGMask(IntPtr fgmask, int poly1Hull0, float perimScale, IntPtr storage)
	{
		return IntPtr(cvSegmentFGMask((CvArr*)fgmask.ToPointer(), poly1Hull0, perimScale, (CvMemStorage*)storage.ToPointer()));
	}

	/// <summary>
	/// </summary>
	/// <param name="fgmask"></param>
	/// <param name="poly1Hull0"></param>
	/// <returns></returns>
	static IntPtr SegmentFGMask(IntPtr fgmask, int poly1Hull0, float perimScale)
	{
		return IntPtr(cvSegmentFGMask((CvArr*)fgmask.ToPointer(), poly1Hull0, perimScale));
	}

	/// <summary>
	/// </summary>
	/// <param name="fgmask"></param>
	/// <returns></returns>
	static IntPtr SegmentFGMask(IntPtr fgmask, int poly1Hull0)
	{
		return IntPtr(cvSegmentFGMask((CvArr*)fgmask.ToPointer(), poly1Hull0));
	}

	/// <summary>
	/// </summary>
	/// <returns></returns>
	static IntPtr SegmentFGMask(IntPtr fgmask)
	{
		return IntPtr(cvSegmentFGMask((CvArr*)fgmask.ToPointer()));
	}

//////////////////////////////////////////////////////////////////////////